//手机号码验证
jQuery.validator.addMethod("mobile", function (value, element) {
	var mobile = /^1[3|4|5|7|8]\d{9}$/;
	return this.optional(element) || (mobile.test(value));
}, "Please inter correct phone number.");
//最多输入两位小数
jQuery.validator.addMethod("rateTwo", function (value, element) {
 	var reg = /^[0-9]+(\.[0-9]{0,2})?$/;
  	return this.optional(element) || (reg.test(value));
  }, "You can only enter two decimal places.");
//只能输入数字和英文字母
jQuery.validator.addMethod("vendorCode", function (value, element) {
 	var reg = /^[A-Za-z0-9]{1,30}$/;
  	return this.optional(element) || (reg.test(value));
  }, "You can only enter numbers and letters.");
//整数或者保留两位小数
jQuery.validator.addMethod("rate", function (value, element) {
   	var reg = /^([0-9]+(\.[0-9]{2})?|0\.[1-9][0-9]|0\.0[1-9])$/;
    	return this.optional(element) || (reg.test(value));
    }, "Please enter a positive number or two decimal places ");
//最多输入四位小数
jQuery.validator.addMethod("rateFour", function (value, element) {
 	var reg = /^[0-9]+(\.[0-9]{0,4})?$/;
  	return this.optional(element) || (reg.test(value));
  }, "You can only enter Four decimal places.");															